home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-PPC / SMP.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  1KB  |  58 lines

  1. /* smp.h: PPC specific SMP stuff.
  2.  *
  3.  * Taken from asm-sparc/smp.h
  4.  */
  5.  
  6. #ifndef _PPC_SMP_H
  7. #define _PPC_SMP_H
  8.  
  9. #include <linux/kernel.h>
  10. #include <linux/tasks.h>
  11.  
  12. #ifdef __SMP__
  13.  
  14. #ifndef __ASSEMBLY__
  15.  
  16. struct cpuinfo_PPC {
  17.     unsigned long loops_per_sec;
  18.     unsigned long pvr;
  19.     unsigned long *pgd_cache;
  20.     unsigned long *pte_cache;
  21.     unsigned long pgtable_cache_sz;
  22. };
  23. extern struct cpuinfo_PPC cpu_data[NR_CPUS];
  24.  
  25. extern int first_cpu_booted;
  26. extern unsigned long smp_proc_in_lock[NR_CPUS];
  27.  
  28. extern void smp_message_pass(int target, int msg, unsigned long data, int wait);
  29. extern void smp_store_cpu_info(int id);
  30.  
  31. #define NO_PROC_ID        0xFF            /* No processor magic marker */
  32. #define PROC_CHANGE_PENALTY    20
  33.  
  34. /* 1 to 1 mapping on PPC -- Cort */
  35. #define cpu_logical_map(cpu) (cpu)
  36. extern int cpu_number_map[NR_CPUS];
  37. extern volatile unsigned long cpu_callin_map[NR_CPUS];
  38.  
  39. #define hard_smp_processor_id() (0)
  40. #define smp_processor_id() (current->processor)
  41.  
  42. struct klock_info_struct {
  43.     unsigned long kernel_flag;
  44.     unsigned char akp;
  45. };
  46.  
  47. extern struct klock_info_struct klock_info;
  48. #define KLOCK_HELD       0xffffffff
  49. #define KLOCK_CLEAR      0x0
  50.  
  51. #endif /* __ASSEMBLY__ */
  52.  
  53. #else /* !(__SMP__) */
  54.  
  55. #endif /* !(__SMP__) */
  56.  
  57. #endif /* !(_PPC_SMP_H) */
  58.